load("@rules_rust//rust:defs.bzl", "rust_library")

package(default_visibility = [
    "//rs/nervous_system/common/test_utils:ic_nervous_system_common_test_utils_visibility",
])

package_group(
    name = "ic_nervous_system_common_test_utils_visibility",
    packages = [
        "//rs/nervous_system/common/...",
        "//rs/nervous_system/integration_tests/...",
        "//rs/nns/...",
        "//rs/sns/...",
    ],
)

DEPENDENCIES = [
    # Keep sorted.
    "//packages/icrc-ledger-types:icrc_ledger_types",
    "//rs/crypto/sha2",
    "//rs/ledger_suite/icp:icp_ledger",
    "//rs/nervous_system/canisters",
    "//rs/nervous_system/common",
    "//rs/rust_canisters/dfn_core",
    "@crate_index//:candid",
    "@crate_index//:futures",
    "@crate_index//:ic-wasm",
    "@crate_index//:lazy_static",
    "@crate_index//:libflate",
    "@crate_index//:prometheus-parse",
]

MACRO_DEPENDENCIES = [
    # Keep sorted.
    "@crate_index//:async-trait",
]

rust_library(
    name = "test_utils",
    srcs = glob(["src/**/*.rs"]),
    crate_name = "ic_nervous_system_common_test_utils",
    proc_macro_deps = MACRO_DEPENDENCIES,
    version = "0.1.0",
    deps = DEPENDENCIES,
)
